<%@ page import="com.apexedu.portal.constant.Constants" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*"%>
<%@ page import="com.apexedu.sys.entity.TSysReportfactory" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://"
          + request.getServerName() + ":" + request.getServerPort()
          + path + "/";
  request.setAttribute("basePath", basePath);
  List resultData = (List)request.getAttribute("reportfactoryList");
  String location = (String)request.getAttribute("location");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title><%=Constants.ProjectInfo.PROJECT_NAME%>
  </title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="${basePath}/component/amazeUI-2.4.2/css/amazeui.min.css" rel="stylesheet">
  <script type="text/javascript" src="${basePath}/resources/ui/js/jquery-1.10.2.min.js"></script>
  <script src="${basePath}/resources/js/mh.shmy.index.js" type="text/javascript"></script>
</head>
<title>展示报表选择</title>
</head>
<style type="text/css">
  .ver01 {
    vertical-align: middle;
  }
  .ali01 {
    text-align: center;
  }
  .navIcon {
    cursor: pointer;
    padding: 15px 0;
    width: 410px;
  }
  .navIcon_left {
    float: left;
    width: 173px;
    padding: 0 0 0 8px;
  }
  .navIcon_right {
    float: left;
    line-height: 220%;
    padding: 0 0 0 8px;
    width: 180px;
  }
  .navIcon img {
    height: 130px;
    width: 173px;
  }
  img {
    border: 0 none;
  }

  .navIcon_right_title {
    color: #0460B7;
    font-weight: bold;
    width: 220px;
  }
  .navIcon_right_con {
    width: 220px;
  }
  #page-wrap {
    width: 600px;
    margin: 15px auto;
    position: relative;
  }

  #sidebar {
    width: 190px;
    position: fixed;
    margin-left: 410px;
  }

</style>
<script>
  /*
   鼠标标记处亮
   */
  $(function(){
    $('.ctr').mouseover(function(e) {
      $(this).siblings().stop().fadeTo(500,0.4);
    });
    $('.ctr').mouseout(function(e) {
      $(this).siblings().stop().fadeTo(500,1);
    });
  })
  /*
   右侧类别随屏幕滚动而滚动
   */
  $(function() {
    var $sidebar   = $("#sidebar"),
            $window    = $(window),
            offset     = $sidebar.offset(),
            topPadding = 15;

    $window.scroll(function() {
      if ($window.scrollTop() > offset.top) {
        $sidebar.stop().animate({
          marginTop: $window.scrollTop() - offset.top + topPadding
        });
      } else {
        $sidebar.stop().animate({
          marginTop: 0
        });
      }
    });
  });

  /*
   添加报表
   */
  function add(id){
    $('#choosewid').val(id);
  }
</script>

<body>
<div>
  <input name="choosewid" id="choosewid" type="hidden" />
  <input name="location" id="location" value="<%=location%>" type="hidden" />
  <div class="am-list-news-bd">
    <%
      if (resultData!=null&&resultData.size()>0){
        TSysReportfactory reportfactory=new TSysReportfactory();
    %>
    <ul class="am-list">
      <!--缩略图在标题左边-->
      <%
        for (int i=0;i<resultData.size();i++) {
          reportfactory= (TSysReportfactory)resultData.get(i);
      %>
      <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
        <div class="am-u-sm-4 am-list-thumb" style="padding-left: 5px;">
          <span style="padding-left: 35px;">
            <input type="radio" name="selectNode" value="<%=reportfactory.getWid()%>" onclick="add('<%=reportfactory.getWid()%>');" >
          </span>
          <span style="padding-left:25px;">
          <a href="javascript:;" class="" >
            <img width="84" src="<%if(reportfactory.getImages()==null){%>${basePath}/resources/images/report/zwtp.png<%}else{%><%=basePath %>/<%=reportfactory.getImages() %><%} %>" onerror="this.src='${basePath}/resources/images/report/zwtp.png'" alt="<%=reportfactory.getChartname()%>"/>
          </a>
          </span>
        </div>
        <div class=" am-u-sm-8 am-list-main" style="width: 387px;padding-left: 5px;">
          <div style="width: 95%">
            <h3 class="am-list-item-hd">
              <a href="javascript:;" class=""><%=reportfactory.getChartname()%></a>
            </h3>
          </div>
          <div class="am-list-item-text" style="width: 95%">
            <%=reportfactory.getShuom()%>
          </div>
        </div>
      </li>
      <%
          }
      %>
    </ul>
    <%
      }
    %>
  </div>
</div>
<div style="position: absolute;right:5px;top:5px;border:1px dashed #000;display: none;" id="sidebar">
  <table class="ali01 ver01" style="margin:0 auto;" >
    <tr><td height="35px;"><a href="javascript:;">综合报表</a></td></tr>
    <tr><td height="35px;"><a href="javascript:;">学院报表</a></td></tr>
    <tr><td height="35px;"><a href="javascript:;">人员报表</a></td></tr>
    <tr><td height="35px;"><a href="javascript:;">其他报表</a></td></tr>
  </table>
</div>
</body>
</html>
